<div id="paidUpPage">
    <div class="post">
        <h2 class="title">Paid Up Members</h2>
        <div class="entry">
            <input type="button" value="Search" onclick="show('#searchpaidUps')"/>
            <input type="button" value="Clear Search" onclick="clearSearch()"/>
            <div id="paidUps_result" class="info">
            </div>
            <script type="text/javascript">
                function searchPaidUp(){
                    field=document.getElementById("searchpaidUpsForm").field.value;
                    search=document.getElementById("searchpaidUpsForm").search.value;
                    $("#paidUpPage").load("<?= base_url(); ?>index.php?/mis/paidUpMembers/"+field+"/"+search);
                }
                function clearSearch(){
                    $("#paidUpPage").load("<?= base_url(); ?>index.php?/mis/paidUpMembers/");
                }


                $('a').click(function() {
                    if(this.href.indexOf("mis/paidUpMembers", 0)>=0){
                        $("#paidUpPage").load(this.href);
                        return false;
                    }
                    return true;
                });
            </script>

            <div id="searchpaidUps" style="display: none;margin-bottom: 10px;">
                <form id="searchpaidUpsForm">
                    <table>
                        <tr class="darker"><td class="half">Select search criteria</td>
                            <td><select name="field">
                                    <option value='all' >All</option>
                                    <option value='names'>Names</option>
                                    <option value='member_no'>Member no</option>
                                    <option value='grade'>Grade</option>
                                    <option value='phone'>Phone</option>
                                    <option value='email'>Email</option>
                                    <option value='branch'>Branch</option>
                                    <option value='perm_address'>Permanent address</option>
                                    <option value='town'>Town</option>
                                    <option value='company'>Company</option>
                                    <option value='physical_address'>Physical address</option>
                                </select></td>
                            <td><input type="text" name="search" class="wide"  value="<?php echo set_value('added_by'); ?>" /></td>
                        </tr>

                        <tr><td colspan="3" style="text-align: right">
                                <input type="button" value="Submit" onclick="searchPaidUp()" />
                                <input type="button" value="Cancel" onclick="hide('#searchpaidUps')"/>
                            </td></tr>

                    </table>
                </form>
            </div>
            <div id="all_paidUp">
                <?= $pagina ?>
                <?= $tablet ?>
                <?= $pagina ?>
            </div>
        </div>
    </div>
</div>